package dp.ua.epic.webapp;

import epic.domain.Hero;
import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebSession;

/**
 * Custom web session that configured for hold {@link Hero}
 * 
 * @author Chris
 * @date 26.01.2011 14:19:36
 */
public class EpicSession extends WebSession {

    private Hero hero = null;

    public EpicSession(Request request) {
        super(request);
    }

    public Hero getHero() {
        return hero;
    }

    public void setHero(Hero hero) {
        this.hero = hero;
    }

    public boolean isHeroInitialized() {
        return hero != null;
    }

    public boolean isHeroWithoutFate() {
        return hero.getDecision() == null;
    }  
}
